% plot curve for E10

[ALLEEG EEG CURRENTSET ALLCOM] = eeglab;
[STUDY ALLEEG] = pop_loadstudy('filename', 'nondual16subjects.study', 'filepath', '/Volumes/donnees/mydata/data/EEG_noetic_data/nondual');
CURRENTSTUDY = 1; EEG = ALLEEG; CURRENTSET = [1:length(EEG)];
STUDY = std_erpplot(STUDY,ALLEEG,'channels',{'E10'});

% get data and plot
erpt = STUDY.changrp(10).erptimes;
erpd = STUDY.changrp(10).erpdata;
figure; plot(erpt, mean(erpd{4},2));
figure; e = errorbar(erpt, mean(erpd{3},2), std(erpd{3},[],2)/sqrt(size(erpd{3},2)));
set(e, 'color', 'r');
hold on; e = errorbar(erpt, mean(erpd{4},2), std(erpd{4},[],2)/sqrt(size(erpd{3},2)));
set(e, 'color', 'b');
xlim([erpt(1) erpt(end)]);
